Add Retrieve command and integrate database retrieval into screenshot prompts#88
Merged
Android-PowerUser merged 7 commits intoApr 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
The PR successfully implements the "Retrieve" command feature for database information retrieval. The implementation is comprehensive and includes:
- New
Command.Retrieveclass for representing retrieval commands - Command parser updates to recognize
retrieve("heading")syntax - UI updates to display retrieval commands in the detected commands list
- Text policy functions for resolving retrieval requests and formatting results
- ViewModel integration to enrich screenshot context with retrieved information
- Proper filtering to prevent duplicate retrievals
- Test coverage for the new command parsing
All changes appear to function correctly and follow the existing code patterns. No blocking defects identified.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
retrieve(...)command so the AI can request information stored in the local system-message database and include that content in subsequent screenshot analysis.Retrievecommands from being executed as accessibility actions and instead resolve them into prompt content to enrich AI reasoning for the next screenshot.Description
Command.Retrievetype and recognition forretrieve("...")inCommandParserand updated logging inlogCommandDetailsand command parsing tests to cover it.PhotoReasoningTextPoliciesto format database entries, resolve a retrieval request (resolveRetrievalRequest), format results for prompts, and detect if a heading was already retrieved in chat.PhotoReasoningViewModelto filter outRetrievecommands from direct execution, buildpendingRetrievedInfoForNextScreenshotwhen atakeScreenshot()is present, and merge that retrieved info intoscreenInfoviabuildEnrichedScreenInfowhen adding screenshots or sending prompts;executeAccessibilityCommandremains unchanged for actionable commands.Retrievein the detected commands list, adjust the database popup explanatory text, change exported filename toDatabase.txt, and add a `retrieve(Codex Task